package com.richard.home.model.api

import com.richard.base.net.bean.KsResponse
import com.richard.home.model.bean.PoetryDetail
import com.richard.home.model.bean.PoetryWord
import okhttp3.RequestBody
import retrofit2.http.*

/**
 ***************************************
 * 项目名称: Giggle
 * @Author wuzhiguo
 * 邮箱：wuzhiguo@ksjgs.com
 * 创建时间: 2020-02-10     10:05
 * 用途: 首页网络 请求 api
 *
 ***************************************
 */
interface HomeService {
    /**
     * 首页获取推荐课程
     */
    @Headers(
        "Content-Type:application/json; charset=UTF-8", "Cache-Control: public, max-age=${24 * 60 * 60}"
    )
    @POST("poetry/getPoetryWords")
    suspend fun homeRecPoetry(@Body requestBody: RequestBody): KsResponse<MutableList<PoetryWord>>


    /**
     * 首页获取诗词详情
     */
    @Headers( "Content-Type:application/json; charset=UTF-8", "Cache-Control: public, max-age=${24 * 60 * 60}")
    @GET("poetry/getPoetry")
    suspend fun homePoetryDetail(
        @Query("id") poetryId: String
    ): KsResponse<PoetryDetail>

}